How many pixels tall the screen is - ask for it instead of typing a number, so a game keeps working on a screen of a different size.
screen_height() -> intint
Gives back how many pixels tall the screen is. It is the partner of screen_width, and everything that page says about asking for the size instead of typing it applies here too: a game that asks always gets the right answer, and a game with the number typed in only works on one screen.
The screen is not the same thing as the room. room_height is how tall the whole level is, and screen_height is how tall the window you look at it through is.
// a bar as tall as the screen, 4 pixels in from the top and the bottom
draw_rect_fill_anchored(ANCHOR_TOP_LEFT, 4, 4, 4, screen_height() - 8, COLOR_BLUE);Draws a thin blue bar down the left edge that stops 4 pixels short of the top and of the bottom. It is 4 wide, and its top-left corner is 4 pixels in and 4 down, because a rectangle's position is its top-left corner. If the screen were taller, the bar would grow with it.
The GBA screen is 160 pixels tall, so this is 160. It is a fixed number known when the game is built, so it costs nothing at run time.